package com.liufh.service.impl;

import com.liufh.service.HelloService;
import com.liufh.service.SonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: liufh
 * @create: 2021-12-30 17:44
 */
/** 注意：此处@Service注解为spring注解，因为是spring的组件扫描（注意和前一工程区分开！要理清楚是怎么用的）*/
@Service("helloService")
public class HelloServiceImpl implements HelloService {

    @Autowired
    private SonService sonService;

    @Override
    public String sayHello(String name) {
        return "hello: " + name;
    }

    @Override
    public String aCallBTest() {
        System.out.println("==aCallBTest start...");
        String sonMethod = sonService.sonMethod();
        System.out.println("==sonMethod:" + sonMethod);
        return "aCallBTest " + sonMethod;
    }

}
